package com.neusoft.service;

import com.neusoft.mapper.EmpMapper;
import com.neusoft.po.Emp;
import com.neusoft.po.ResponseBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmpServiceImpl implements EmpService{

    @Autowired
    private EmpMapper em;

    @Override
    public ResponseBean<Emp> getEmpByNo(Integer empno) {
        Emp emp = em.getEmpByNo(empno);
        if(emp!=null){
            return new ResponseBean<>(emp);
        }else{
            return new ResponseBean<>(602,"数据不存在");
        }
    }
}
